//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef _BindingSitePredictionRefinement_h__
#define _BindingSitePredictionRefinement_h__
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include "BindingSitePredictionData.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#define USE_FACTOR_AS_SUM     0
#define USE_FACTOR_AS_PRODUCT 1
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
class BindingSitePredictionRefinement { 

  private:

    String                              OutFormatedArray (String* data, int type);
    String                              OutFormatedArray (float* data, int size, int type);

  protected:

    String*                             filenameOut;
    
    BindingSitePredictionData*          predictionBindingSite;
    BindingSitePredictionData*          predictionBindingSiteRefined;
    
    TListE <BindingSitePredictionData>* refinementBindingSites;
    TListE <float>*                     refinementLingoSimilarity;
    
    String*                             toString;

  public:

    BindingSitePredictionRefinement ();
    BindingSitePredictionRefinement (const BindingSitePredictionRefinement&);
    BindingSitePredictionRefinement (const BindingSitePredictionRefinement*);

    ~BindingSitePredictionRefinement ();

    void                                FilenameOut (String* filenameOut);
    void                                PredictionBindingSite (BindingSitePredictionData* predictionBindingSite);
    void                                PredictionBindingSiteRefined (BindingSitePredictionData* predictionBindingSiteRefinement);
    void                                RefinementBindingSites (TListE<BindingSitePredictionData>* refinementBindingSites);
    void                                RefinementLingoSimilarity (TListE<float>* refinementLingoSimilarity);

    String*                             FilenameOut (void);
    BindingSitePredictionData*          PredictionBindingSite (void);
    BindingSitePredictionData*          PredictionBindingSiteRefined (void);
    TListE<BindingSitePredictionData>*  RefinementBindingSites (void);
    TListE<float>*                      RefinementLingoSimilarity (void);

    bool                                LoadData (void);
    
    bool                                ComputeRefinePredictionBindingSite (int useFactor);
    
    String*                             ToCSVScores (void);
    bool                                OutToCSVFile (void);

    BindingSitePredictionRefinement     operator= (const BindingSitePredictionRefinement& bindingSitePredictionRefinement);

};
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
